import edu.princeton.cs.algs4.StdOut;

public class AnswerCode {
    public static void main(String[] args) {
        String s = "Hello World";
        String half = mystery(s);
        StdOut.println(s);
        StdOut.println(half);
    }
    public static String exR1(int n)
    {
        if (n <= 0) return "";
        return exR1(n-3) + n + exR1(n-2) + n;
    }
    public static String mystery(String s)
    {
        int N = s.length();
        if (N <= 1) return s;
        String a = s.substring(0, N/2);
        String b = s.substring(N/2, N);
        return mystery(b) + mystery(a);
    }
}
